#pragma once

#include "NeroEngine\NGameClock.h"
#include "NContactListener.h"
#include <Box2D/Box2D.h>

#define GRAVITY 10
#define CONVERSION 10.0f

class PhysicsWorld
{
public:
	PhysicsWorld(void);

	~PhysicsWorld(void);

	b2World* GetWorld();

	b2Body* CreateBody(b2BodyDef* bodydef);

	void Update(const Game::NTime& gameTime);

	static float ConvertWorldToScreen(float value);

	static float ConvertScreenToWorld(float value);

	static void Initialize();

	static void Deinitialize();

	static PhysicsWorld* GetInstance();

private:
	void InitWorld();

	void DeinitWorld();

	b2World* mWorld;
	NContactListener mListener;
	static PhysicsWorld* sInstance;
};

